<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE >
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<%
	String path = request.getContextPath();
	// 获得本项目的地址(例如: http://localhost:8080/MyApp/)赋值给basePath变量 
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	// 将 "项目路径basePath" 放入pageContext中，待以后用EL表达式读出。 
	pageContext.setAttribute("basePath", basePath);
	//out.write(basePath);
%>
<jsp:include page="inc1.jsp"></jsp:include>
</head>
<body>
        <table class="table table-striped">
      <thead>
        <tr>
          <th>#</th>
          <th>学生名字</th>
          <th>课程编号</th>
          <th>课程名称</th>
          <th>任课老师编号</th>
          <th>任课老师姓名</th>
          <th>学科成绩</th>
        </tr>
      </thead>
      <tbody>
      <c:forEach items="${sessionScope.stucourse}" var="stu" varStatus="st">
        <tr>
          <td>${st.index+1}</td>
          <td>${stu.username}</td>
          <td>${stu.courseid}</td>
          <td>${stu.coursename}</td>
          <td>${stu.teacherid}</td>
          <td>${stu.teachername}</td>
          <td>${stu.coursescore}</td>
          <td><a href="<%=basePath %>LastSevelet?uid=${stu.courseid }&slas=0" onclick="return confirm('是否确定选择课程！')"><button type="button" class="btn btn-default">&nbsp;&nbsp;退&nbsp;&nbsp;&nbsp;选&nbsp;&nbsp;</button></a> </td>
        </tr>
        </c:forEach>
      </tbody>
    </table>
    

</body>
</html>